package com.yanchangapp.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zxl.baselib.util.image.GlideLoaderUtils;
import com.yanchangapp.R;
import com.yanchangapp.model.bean.MenuIcons;

import java.util.List;


public class HomeIconsAdapter extends BaseQuickAdapter<MenuIcons, BaseViewHolder> {

    public HomeIconsAdapter(int layoutResId, @Nullable List<MenuIcons> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MenuIcons item) {
        helper.setText(R.id.tvMenuDes,item.getDes());
        ImageView ivMenu =  helper.getView(R.id.ivMenuIcon);
        GlideLoaderUtils.display(mContext,ivMenu,item.getAddress());
    }
}
